﻿define(function(require,exports,module) {
	var myPub = require('./public');

	// var getDateUrl = '/static_v4/js/dataJson/estimateData.json';
	var getDateUrl = '/shop/goodsComment/commentList';

    var oEstimateBox = $('.js_estimateBox');
    var oEstimateHead = $('.js_estimateHead');
    var oEstimateNav = $('.js_estimateNav');
    var oFooter = $('.footer');

    var oEstimateNavList = $('.js_estimateNavList');    // 导航

    var oCountNum = $('.js_count');                     // 记录评价数
    // var oComment = $('.js_comment');                    // 总评价数
    var oErrPage = $('.js_errPage');                    // 没有评论提示页面
    var oGoTop = $('.js_goTop');                        // 回到顶部
    var oSideBox = $('.js_sideBox');		            // 侧边按钮框

    var commentByCountUrl = '/m/g/comment/1.0/commentByCount';                  // 商品评论数量
    var commentByPageUrl = '/m/g/comment/1.0/commentByPage';                    // 商品评论分页获取
    var commentAutoUrl = '/m/g/comment/1.0/countAutomaticGoodsComment';         // 获取商品自动评价数量
    var commentScoreUrl = '/m/g/comment/1.0/goodsCommentScore';                 // 商品评论评分获取


    oEstimateNav.on("touchmove",function(e) {e.preventDefault()});
    oFooter.on("touchmove",function(e) {e.preventDefault()});

    var lazLoading = new myPub.lazLoadingImg();

    module.exports = {
        init:function(){
            getEstimate.getCommentary();
            // getEstimate.getAllCount();


            /* estimate.estimateInit();
             estimate.SetPageNum();
             GetEstimateData.SetAjaxData(function () {
                 GetData.loadOff[0] = false;
             });
            // 滚动加载
            estimate.ScrollHide();*/

            $(window).unload(function(){
                // SetSession()
            });
        }
    };




    $(window).resize(function() {
        estimate.estimateInit();
        estimate.SetLiHeight($('.js_estimateTabScroll'));
    })

    // 回到顶部
    oGoTop.on('click',function(e) {
        var oEstimateTabScroll = $('.js_estimateTabScroll');
        var index = oEstimateNavList.find('li.active').index();
        oEstimateTabScroll.eq(index).scrollTop(0);
        e.stopPropagation();
    });




    var GetData = {
        maxLimit: 50,               // 后台请求多少条评论数据
        getCoutNum: 0,              // 后台请求多少次
        getDataOff: true,           // 容许获取后台数据开关 false 说明后台数据已全部获取完了
        limit: 20,                  // 每次加载多少数据
        begin:[],                   // 开始
        end:[],                     // 结束数据
        pageNo: [],                 // 页码
        pageCount: [],              // 页码总数
        loadOff:[],                 // 加载数据的开关
        allDate: [],                // 全部数据
        goodDate: [],               // 好评数据
        generalDate: [],            // 中评数据
        badDate: [],                // 差评数据
        imgPathDate:[],             // 有图数据
        scrollTop: [],              // 历史滚动数据
        // 根据所以获取对应的数据
        getArry: function (index) {
            switch (index) {
                case 0:
                    return GetData.allDate;
                    break;
                case 1:
                    return GetData.imgPathDate;
                    break;
                case 2:
                    return GetData.goodDate;
                    break;
                case 3:
                    return GetData.generalDate;
                    break;
                case 4:
                    return GetData.badDate;
                    break;
            }
        },
        SetSession: function () {
            sessionStorage.setItem("est-scroll", GetData.scrollTop);
            sessionStorage.setItem("est-pageNo", GetData.pageNo);
            sessionStorage.setItem("est-loadOff", GetData.loadOff);
        }
    }

    var estimate = {
        // 页面位置调整
        estimateInit: function () {
            oEstimateNav.css({'top': 0})
            oEstimateBox.css({
                'top': oEstimateNav.outerHeight(true)+5,
            });
            oErrPage.css({
                'top': oEstimateNav.outerHeight(true)+5,
            });
        },

        // 设置li的宽度和高度
        SetLiHeight: function (obj) {
            // var oEstimateList = $('.js_estimateList');
            var oEstimateList = obj;
            var oImgList = oEstimateList.find('li img');

            var oEstimateListLiW = oEstimateList.find('.js_showImg').width()*0.312;

            oEstimateList.find('li').css({
                'height': oEstimateListLiW,
                'width' : oEstimateListLiW
            });


        },

        // 滚动隐藏搜索
        ScrollHide: function () {
            var oEstimateTabScroll = $('.js_estimateTabScroll');
            var beforScroll = [];
            var scrollTime;
            var minScrHeight = 200;

            oEstimateTabScroll.each(function (i) {
                beforScroll[i] = oEstimateTabScroll.eq(i).scrollTop()
            });

            var oEstimateNavHeight = oEstimateNav.outerHeight(true);
            var oEstimateHeadHeight =  oEstimateHead.outerHeight(true);

            oEstimateTabScroll.on('scroll', function () {
                var index = $(this).index();
                var afterScroll = $(this).scrollTop();
                var res = afterScroll - beforScroll[index];

                var _TypeLabel = oEstimateNavList.find('li').eq(index).attr('typelabel');
                var _dataName = GetData.getArry(index);

                /*
                // 隐藏导航操作
                if(afterScroll > oEstimateHeadHeight) {

                    oEstimateBox.css({'top': oEstimateHeadHeight});
                    oEstimateTabScroll.css({ 'padding-top': oEstimateHeadHeight });
                    if(res>0){
                        //console.log('xia'+afterScroll);
                        oEstimateNav.css({'top': -oEstimateHeadHeight})
                    }else{
                        //console.log('shang'+afterScroll);
                        oEstimateNav.css({'top': 0})
                    }
                    beforScroll[index] = afterScroll;
                }
                else {
                    oEstimateBox.css({'top': oEstimateNavHeight + 5});
                    oEstimateTabScroll.css({ 'padding-top': 0 });
                    oEstimateNav.css({'top': 0})
                }
                */


                // 设置页面滚动高度并记录
                GetData.scrollTop[index] = afterScroll;

                // 滚动页面底部200像素 延迟150毫秒加载数据
                clearTimeout(scrollTime);
                scrollTime = setTimeout(function() {
                    afterScroll > 300 ? oSideBox.stop().animate({'right':0},250) : oSideBox.stop().animate({'right': '-3.5rem'},250);
                    if(oEstimateTabScroll[index].scrollHeight - afterScroll - oEstimateTabScroll.height() < minScrHeight) {

                        // 页码数大于页码总数 返回
                        if(GetData.pageNo[index] >= GetData.pageCount[index]) {
                            oEstimateTabScroll.eq(index).find('.js_moreBtnBox p').hide().eq(0).show();
                            return;
                        }
                        // GetEstimateData.ConnectHtml(_dataName, index, _TypeLabel);
                        GetEstimateData.SetAjaxData();
                    }
                },100);
            })

        },

        // 设置页面个数
        SetPageNum: function (count) {
            var thtml = '';
            if(count == 0){
                thtml = '没有更多了'
            }else{
                thtml = count+'个用户默认评价了该商品'
            }
            var sBoxHtml =
                '<div class="estimateMain estimateTab js_estimateTabScroll" style="display: none;">' +
                '   <div class="js_listBox listBoxCon"></div> ' +
                '   <div class="moreBtnBox js_moreBtnBox border_top">'+
                '       <p class="showNewTip" style="display: none;">' +
                '           <span class="autoEstimateImg"></span>'+
                '           <span class="autoEstimateTip">'+thtml+'</span>' +
                '       </p>'+
                '       <p class="loadingBtn js_loading" >'+
                '           <span class="icon_loading icoStyle icon-spinner3 myRotateRefresh"></span><span>加载中</span>'+
                '       </p>'+
                '   </div>'+
                '</div>';

            var nPageNum = oEstimateNavList.find('li').length;

            if(nPageNum === 0) {
                nPageNum = 1;
            }
            for (var i=0; i<nPageNum; i++) {
                oEstimateBox.prepend(sBoxHtml);
                GetData.begin.push(0);
                GetData.end.push(0);
                GetData.pageNo.push(0);
                GetData.pageCount.push(0);
                GetData.scrollTop.push(0);
                GetData.loadOff.push(true);

            }
        }
    }


    // 获取数据
    var GetEstimateData = {
        // 设置数据
        SetAjaxData: function (fn) {
            var _this = this;
            var oEstimateTabScroll = $('.js_estimateTabScroll');
            var index = oEstimateNavList.find('li.active').index();
            var sType = oEstimateNavList.find('li.active').attr('typelabel');

            G_JSON_GET(commentByPageUrl,{
                "goodsId": goodsId,
                "type": index+1,
                "start": GetData.begin[index],
                "limit": GetData.limit
            },function (data) {
                    // console.log('start---' + GetData.begin[index])
                // var dataJson = data.ratings;
                var dataJson = data.data;
                // if( data.status == "sucess") {
                if( data.ret.code == "0") {
                    // 全部数据
                    GetData.allDate = dataJson;

                    // 对应评论数为0 return
//                    if(dataJson.length == 0) {
//                        oEstimateTabScroll.eq(index).find('.js_moreBtnBox p').hide();
//                        oErrPage.show();
//                        return
//                    }
//                     console.log(oComment.eq(index).text())
                     GetData.pageCount[index] = Math.ceil(getEstimate.oComment.eq(index).text() / GetData.limit);
                    //
                    // // 评论总数设置
                    // oComment.text(dataJson.length);
                    // // 全部评价数设置
                    // oCountNum.text(dataJson.length);

                    //评论分类-有图片和无图片分类
                    // for (var i=0; i<dataJson.length; i++){
                    //     // console.log(dataJson[i])
                    //     if (dataJson[i].imagePath){
                    //         GetData.imgPathDate.push(dataJson[i])
                    //     }else {
                    //         if (dataJson[i].appendImagePath){
                    //             GetData.imgPathDate.push(dataJson[i])
                    //         }
                    //     }
                    // }

                    /*
                    // 数据分类
                    for (var i=0; i<dataJson.length; i++) {
                      // 好评
                      if(dataJson[i].star == 5 || dataJson[i].star == 4) {
                          // console.log(dataJson[i])
                          GetData.goodDate.push(dataJson[i])
                      }
                      // 中评
                      else if (dataJson[i].star == 3) {
                          // console.log(dataJson[i])
                          GetData.generalDate.push(dataJson[i])
                      }
                      // 差评
                      else {
                          // console.log(dataJson[i])
                          GetData.badDate.push(dataJson[i])
                      }
                  }
                  */
                    if(dataJson.length < GetData.limit) {
                    	GetData.loadOff[index] = false
                        oEstimateTabScroll.eq(index).find('.js_moreBtnBox p').hide().eq(0).show();
                        
                        if(dataJson.length > 0) {
                        	_this.ConnectHtml(dataJson, index, sType);
                        }
                        
                        if( GetData.pageNo[index] < 1) {
                            if(getEstimate.autoCount > 0){
                                oEstimateTabScroll.eq(index).show();
                                oEstimateTabScroll.eq(index).find('.js_moreBtnBox p').hide().eq(0).show();
                            }else{
                                oEstimateTabScroll.eq(index).find('.js_moreBtnBox p').hide();
                                oErrPage.show();
                                return
                            }

                        }
                         
                        
                    }
                    else {
                    	_this.ConnectHtml(dataJson, index, sType);
                    }
                    
                    
                    // GetData.pageNo[index]++;
                    // GetData.end[index] = GetData.pageNo[index] * GetData.limit;
                    // _this.ConnectHtml(dataJson, index, sType);
                    if(fn)fn()
                }

                // 请求错误
                else {
                    oEstimateTabScroll.eq(index).find('.js_moreBtnBox p').hide();
                    oErrPage.show();
                }

            }, function () {
                // start
            }, function () {

            });

        },

        // 拼接HTML
        ConnectHtml: function (dataJson, index, sType, fn) {
            var _this = this;
            var oEstimateTabScroll = $('.js_estimateTabScroll');
            var shtml='';
            var rateTime, updatePic, updatePicAfter, platformReply, supplierReply, appendPlatformReply, appendSupplierReply ;

            var attrList = '';

            GetData.pageNo[index]++;
            // console.log(index);
            // GetData.begin[index] = GetData.end[index];
            // GetData.end[index] = GetData.pageNo[index] * GetData.limit;
            GetData.begin[index] = GetData.pageNo[index] * GetData.limit;
            // if(GetData.end[index] > dataJson.length ) {
            //     GetData.end[index] = dataJson.length
            // }
            //
            // if(GetData.begin[index] >= GetData.end[index]) {
            //     return;
            // }

            var _pageNo = GetData.pageNo[index];
            var _begin = GetData.begin[index];
            // var _end = GetData.end[index];


            // console.log('_begin:' +  _begin)
            // console.log('_end:' + _end)
            // console.log('_pageNo:' + _pageNo)

            // for (var i=_begin; i<_end; i++) {
            for (var i=0; i<dataJson.length; i++) {

                // 设置参数
                attrList = {
                    'text': dataJson[i].comment,
                    'textAfter': dataJson[i].appendComment,
                    'rateAfterDate': dataJson[i].appendDateStr,
                    'platformReply': dataJson[i].platformReply,
                    'appendPlatformReply': dataJson[i].appendPlatformReply,
                    'supplierReply': dataJson[i].supplierReply,
                    'appendSupplierReply': dataJson[i].appendSupplierReply,
                    'sType': sType,
                    'pageNo': _pageNo,
                    'indexNum': i
                };

                var imgUrl = dataJson[i].headPortraitPath;
                if(imgUrl == '' || imgUrl == null) imgUrl = defualtImg;

                // 设置时间
                rateTime = _this.setDate(dataJson[i].createDate);

                // 设置评价图片
                updatePic = _this.SetInfoList(dataJson[i].imagePath, attrList);

                // 设置追评图片
                updatePicAfter = _this.SetInfoList(dataJson[i].appendImagePath, attrList, true);

                // 设置评价-商家回复
                supplierReply = _this.SystemReplyHtml(attrList);

                // 设置追评-商家回复
                appendSupplierReply = _this.SystemReplyHtmlAgain(attrList);

                // 设置评价-平台回复
                platformReply = _this.SystemReplyHtml(attrList, true);

                // 设置追评-平台回复
                appendPlatformReply = _this.SystemReplyHtmlAgain(attrList, true);

                if(shtml == undefined) shtml = '';
                shtml +=
                    '<div class="estimateList js_estimateList js_'+ sType +'-'+ _pageNo +'">'+
                    '   <div class="estimateUser HBox BoxCenter">'+
                    '       <div class="userInfo Bflex1">' +
                    '           <figure><img src="'+ imgUrl + smallImgArg200 +'" alt=""></figure>' +
                    '           <div class="userName">' +
                    '               <div class="name"><span>'+ dataJson[i].nickName +'</span></div>' +
                    '               <div class="user_star actStar'+ dataJson[i].star +'">' +
                    '                   <span class="icon_star_small"><span class="real-star"></span></span>' +
                    '               </div>' +
                    '           </div>' +
                    '       </div>' +
                    '       <aside class="estimateTime ">'+ rateTime +'</aside>' +
                    '   </div>'+
                        updatePic  + supplierReply + platformReply + updatePicAfter + appendSupplierReply + appendPlatformReply +
                    '</div>';

            }

            oEstimateTabScroll.eq(index).show().find('.js_listBox').append(shtml);

            var oListBox = oEstimateTabScroll.eq(index).find('.js_listBox');
            var oListImg = oEstimateTabScroll.eq(index).find('.js_'+ sType +'-'+ _pageNo +'');


            lazLoading.DestroyLazLoadingImg();
            lazLoading.AddLazLoadingImg(oEstimateTabScroll[index], function () {
                estimate.SetLiHeight(oListImg);
            });

            // estimate.SetLiHeight(oListImg);

            // 数据高度小于页面高度
            /*if(oListBox.height() < oEstimateTabScroll.height()) {
            	if(!GetData.loadOff[index]) return
//                GetEstimateData.ConnectHtml(dataJson, index, sType);
            	GetEstimateData.SetAjaxData();
            }*/

            if(fn)fn();

        },

        // 设置用户评价信息
        SetInfoList: function (dataImg, attrList, bChase) {
            var _shtml = '';
            var discussTime = '用户当天评论';
            var aUpdatePic = [];


            // 评价为空处理
            if(attrList.text == undefined) attrList.text = '';

            // 追评为空处理
            if(attrList.textAfter == undefined) attrList.textAfter = '';

            // 追评天数处理
            if(attrList.rateAfterDate == undefined) {
                discussTime = '';
            }
            else {
            	discussTime = attrList.rateAfterDate;
            }

            // 图片处理
            if(dataImg != '' && dataImg != undefined) {
                // dataImg = dataImg.split(',');
                for (var i = 0; i<dataImg.length; i++) {
                    var dataImage = '';
                    if(dataImg[i].indexOf('http') > -1){
                        dataImage = 'http://img.sfddj.com/vueStatic/img/commentErrImg.png'
                    }else{
                        dataImage = httpImageUrl + dataImg[i];
                    }
                    // 追评图片
                    if(bChase) {
                        aUpdatePic += '<li ><img class="js_lazyImg"  data-preview-src="' + dataImage + '"  data-preview-group="'+ attrList.sType +'-'+ attrList.pageNo + '-' + attrList.pageNo + '-'+ attrList.indexNum +'"  data-echo="' + dataImage + smallImgArg200 + '" src="/static_v4/image/loadImg.jpg" alt=""></li>'
                    }
                    // 评论图片
                    else {
                        aUpdatePic += '<li ><img class="js_lazyImg" data-preview-src="'+ dataImage +'"  data-preview-group="'+ attrList.sType +'-'+ attrList.pageNo + '-' + attrList.indexNum +'" data-echo="'+ dataImage + smallImgArg200 +'" src="/static_v4/image/loadImg.jpg" alt=""></li>'
                    }
                }
            }
            else {
                aUpdatePic = ''
            }


            // 判断追评和正常评价html
            if(bChase) {
                _shtml = '<div class="estimateInfo_title">'+ discussTime +'</div>'+ '<p>'+ attrList.textAfter +'</p>';
            }
            else {
                _shtml = '<p>'+ attrList.text +'</p>';
            }
           var picHtml = '';
            if(aUpdatePic.length > 0){
                picHtml =   '   <div class="showImg js_showImg">' +
                            '       <ul class="clearfix">' + aUpdatePic + '</ul>' +
                            '   </div>';
            }

           var shtml = '<div class="estimateInfo">' +_shtml +picHtml+'</div>';

            return shtml;

        },

        // 商家和平台追评回复
        SystemReplyHtmlAgain: function (attrList, bSystem) {
            var shtml
            var _title = '';
            var _text = '';


            if(bSystem) {
                // 平台回复 为空处理
                if(attrList.appendPlatformReply == undefined || attrList.appendPlatformReply == "") {
                    shtml = '';
                }
                else {
                    _title = '平台回复：';
                    _text = attrList.appendPlatformReply;
                    shtml =
                        '<div class="estimateInfo systemReply">' +
                        '   <p>'+ _title +'</p>' +
                        '   <p>'+ _text +'</p>'+
                        '   <aside class="arr_up"></aside>' +
                        '</div>';
                };
            }
            else {
                // 商家回复 为空处理
                if(attrList.appendSupplierReply == undefined || attrList.appendSupplierReply == ""){
                    shtml = ''
                }
                else {
                    _title = '商家回复：';
                    _text = attrList.appendSupplierReply;
                    shtml =
                        '<div class="estimateInfo systemReply">' +
                        '   <p>'+ _title +'</p>' +
                        '   <p>'+ _text +'</p>'+
                        '   <aside class="arr_up"></aside>' +
                        '</div>';
                }
            }

            return shtml
        },

        // 商家和平台评价回复
        SystemReplyHtml: function (attrList, bSystem) {
            var shtml
            var _title = '';
            var _text = '';


            if(bSystem) {
                // 平台回复 为空处理
                if(attrList.platformReply == undefined || attrList.platformReply == "") {
                    shtml = '';
                }
                else {
                    _title = '平台回复：';
                    _text = attrList.platformReply;
                    shtml =
                        '<div class="estimateInfo systemReply">' +
                        '   <p>'+ _title +'</p>' +
                        '   <p>'+ _text +'</p>'+
                        '   <aside class="arr_up"></aside>' +
                        '</div>';
                };
            }
            else {
                // 商家回复 为空处理
                if(attrList.supplierReply == undefined || attrList.supplierReply == ""){
                    shtml = ''
                }
                else {
                    _title = '商家回复：';
                    _text = attrList.supplierReply;
                    shtml =
                        '<div class="estimateInfo systemReply">' +
                        '   <p>'+ _title +'</p>' +
                        '   <p>'+ _text +'</p>'+
                        '   <aside class="arr_up"></aside>' +
                        '</div>';
                }
            }

            return shtml
        },

        // 设置日期
        setDate: function (str) {
            var _Data = ''
            if( str !== undefined) {
                var dateTime = 'Date('+ str +')/'.replace(/\//g, '');
                dateTime = eval('new ' + dateTime);
                _Data = myPub.FormatDateTime(dateTime,'minDay');
            }
            return _Data;
        }
    }

    //
    var getEstimate = {
        oComment:'',                       // 总评价数
        autoCount: 0,                      // 默认评论的个数

        // 获取goodsId
        getId:function(){
            var _this = this;
            var url = window.location.href;
            var useArr = '';
            var goodsId = '';
            var index = 0;
            if(url.indexOf('comment_all/') != -1){
                useArr = url.split('comment_all/')[1];

                if(useArr.indexOf('?') != -1){
                    index = useArr.indexOf('?')
                }else{
                    index = useArr.length;
                }
                goodsId = useArr.substring(0,index);
            }
            return goodsId
        },

        // 获取好评度数据
        getCommentary:function(){
            var _this = this;
            G_JSON_GET(commentScoreUrl,{
                'goodsId': _this.getId()
            },function (data) {
                var dataItem = data;
                if(dataItem.ret.code == '0'){
                    var tHtml = '<p class="fl">好评度<span class="color_red">'+dataItem.data+'%</span></p>';
                    oEstimateHead.append(tHtml);
                    // 获取默认评论的个数
                    _this.getAutoEstimate();
                }
            })
        },

        // 获取商品评论数量
        getAllCount:function () {
            var _this = this;
            G_JSON_GET(commentByCountUrl,{
                'goodsId': _this.getId()
            },function (data) {
                var dataItem = data;
                // console.log(dataItem);
                if(dataItem.ret.code == '0'){
                    oEstimateNavList.append(_this.getAllCountHtml(dataItem.data.allCount,dataItem.data.youTuCount));

                    _this.oComment = $('.js_comment');
                    // 初始化页面的数据
                    // 页面初始化获取头部nav的高度
                    estimate.estimateInit();
                    // 设置有几个页面
                    estimate.SetPageNum(_this.autoCount);
                    // 切换全部评论与有图评论
                    _this.shiftEvent();
                    GetEstimateData.SetAjaxData(function () {
                        GetData.loadOff[0] = false;
                    });

                    // 滚动加载
                    estimate.ScrollHide();
                }
            })
        },

        // 点击切换全部与有图
        shiftEvent:function(){
             var _this = this;
            // 导航点击切换
            oEstimateNavList.find('li').on('click', function () {
                var oEstimateTabScroll = $('.js_estimateTabScroll');
                var index = $(this).index();
                oEstimateNavList.find('li').removeClass('active').eq(index).addClass('active');

                // 获取点击li的分类类型
                var _TypeLabel = $(this).attr('typeLabel');

                var _dataName = GetData.getArry(index);

                estimate.estimateInit();
                oEstimateTabScroll.hide().eq(index).show();
                if( _this.oComment.eq(index).text()*1 === 0 ) {
                    oErrPage.show();
                    GetData.loadOff[index] = false;
                    return;
                }
                else {
                    oErrPage.hide();
                }
                if(GetData.loadOff[index]) {
                    // console.log(GetData)
                    GetEstimateData.SetAjaxData(function () {
                        GetData.loadOff[index] = false
                    });
                }

            });
        },

        // 商品默认评论的数量
        getAutoEstimate:function(){
            var _this = this;
            G_JSON_GET(commentAutoUrl,{
                'goodsId': _this.getId()
            },function (data) {
                if(data.ret.code == '0'){
                    _this.autoCount = data.data;
                    _this.getAllCount();
                }
            })
        },

        // 获取评论数量Html
        getAllCountHtml:function (all,picture) {
            var thtml =
                '<ul class="HBox ">'+
                '   <li class="active" typeLabel="all">'+
                '       <span>全部(<em class="js_comment">'+all+'</em>)</span>'+
                '   </li>'+
                '   <li class="" typeLabel="youtu">'+
                '       <span>有图(<em class="js_comment">'+picture+'</em>)</span>'+
                '   </li>'+
                '</ul>';
            return thtml
        }
    };
    // getEstimate.getId();

});


